Home
Products
Community
Manuals
Contact
Login or Signup

MiniB3D Extended - Not loading textures?

BlitzMax Modules Forums/MiniB3D/MiniB3D Extended - Not loading textures?

SystemError51(Posted 1+ years ago) #1
So I got klepto's MiniB3D extended remix from here.

For some reason, it does not seem to load any textures whatsoever. I'm not sure, either I'm completely stupid or the mod is broken.

Local cube:TMesh = CreateCube() 
ScaleEntity cube, 10, 10, 10 

Global cubetex:TTexture = LoadTexture("test.png")
EntityTexture cube, cubetex
EntityColor(cube, 255, 200, 0)


Also, EntityColor has no effect. The cube stays gray.

So either I'm doin it rong - or there really is an issue?


Cheers peeps

Last edited 1+ years ago


kfprimm(Posted 1+ years ago) #2
Are you using "Framework"? The only reason I can think of may be that the module does not import all the BRL pixmap loaders by default.

Try "Import BRL.PNGLoader"


SystemError51(Posted 1+ years ago) #3
Tried that just now... but had no effect.


GNS(Posted 1+ years ago) #4
Do the samples work for you? I think the "Shader_sample.bmx" example uses a textured mesh.


SystemError51(Posted 1+ years ago) #5
There's a sample with a mesh and shadow, which is textured, which is working fine. When I however adapt the code to a more simple one with just a cube, it's not working. This is weird all right.


GNS(Posted 1+ years ago) #6
Import klepto.minib3dextnew

Graphics3D(800,600,0,2)

Local cam:TCamera = CreateCamera()

Local obj:TMesh = CreateCube()
Local tex:TTexture = LoadTexture("YOUR_IMAGE_DOT_WHATEVER")

EntityTexture(obj, tex)
PositionEntity(obj, 0, 0, 10)
EntityColor(obj, 255,0,255)

While Not KeyHit(KEY_ESCAPE)
	Cls()
	
	RenderWorld()
	
	Flip(True)
Wend


Does this work for you?


SystemError51(Posted 1+ years ago) #7
Like I said before... using this approach is not working for some hideous reason


GNS(Posted 1+ years ago) #8
Definitely strange. That snippet shows a pink textured cube on my PC.


KronosUK(Posted 1+ years ago) #9
works fine for me.. might be helpful if you post your full code


SystemError51(Posted 1+ years ago) #10
It so turns out that there may have been a corrupted download or something, or whatever... I redownloaded the mod, recompiled, and now it's working =/ Who knows what happened.