Re: raylibshim - A shim library for Euphoria and Raylib

new topic     » goto parent     » topic index » view thread      » older message » newer message

Well, I got it to work, somewhat. It doesen't show the image, but it does show a bunch of garbled random characters.

public constant xDrawTexture = define_c_proc(ray,"+DrawTexture",{C_UINT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_UINT}) 
 
public procedure DrawTexture(sequence seg,atom x,atom y,atom tint) 
 
 c_proc(xDrawTexture,{seg[1],seg[2],seg[3],seg[4],seg[5],x,y,tint}) 
	 
end procedure 
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 yello = bytes_to_int({255,255,0,255}) 
 
InitWindow(width,height,"Simple Texture") 
 
 
while not WindowShouldClose() do 
 
	BeginDrawing() 
 
	ClearBackground(black) 
	 
	DrawText("This is Texture",1,1,20,yello) 
	 
	 
    gLoadTextureFromImage("raylib_logo.png")  
	 
    sequence texture_info = {2,150,150,1,0} 
     
	DrawTexture(texture_info,width / 2, height / 2,white) 
	 
	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