Re: raylibshim - A shim library for Euphoria and Raylib

new topic     » goto parent     » topic index » view thread      » older message » newer message
Maccuq said...
gLoadTextureFromImage("raylib_logo.png")   
sequence texture_info = {3,150,150,1,0} -- Have you tried to change the first element of the sequence to 3?? 

{x,150,150,1,0} where x:

1 = placeholder

2 = defalut font texture

3 = your texture 1 ("raylib_logo.png")

5 = your texture n

Thanks for the tips. After playing around, I got it!

without warning 
 
include std/machine.e 
include std/convert.e 
 
include Euraylib.ew 
--include raylibshim.e 
 
constant width = 800 
constant height = 450 
 
atom black = bytes_to_int({0,0,0,0}) 
atom white = bytes_to_int({255,255,255,255}) 
atom yellow = bytes_to_int({255,255,0,255}) 
atom blue = bytes_to_int({0,0,255,255}) 
 
InitWindow(width,height,"Simple Texture") 
 
 
while not WindowShouldClose() do 
 
	BeginDrawing() 
 
	ClearBackground(blue) --changed background to blue 
	 
	DrawText("This is Texture",1,1,20,yellow) 
	 
	 
    gLoadTexture("raylib_logo.png")  --changed to gLoadTexture from gLoadTextureFromImage 
	 
    sequence texture_info = {3,256,256,0,0} --3 made the image appear 
     
	DrawTexture(texture_info,10, 50,white) --changed location of where image appears ons creen (the image is 256 x 256 in width & height) 
	 
	EndDrawing() 
	 
end while 
 
CloseWindow() 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu