Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Texture Chugginess  (Read 1499 times)
0 Members and 1 Guest are viewing this topic.
Offline Evil_Tigger

Innocent Bystander

Give me cofffffeeeeeeee !

« Posted 2002-12-30 07:58:54 »


First of all I'm new to j3d and these forums, so a big hello to anyone that reads this!

Now, my first j3d problem....I've noticed that my untextued objects render really fast, but when I add a texture (even to a single tri) then the frame rate drops below 1fps.

I figure this is something to do with the way I'm loading the textures and setting up the appearance (as the sample code didn't work for me), as other applets with textures seem to work fine so i've ruled out a vm/video card/driver problem.

If i use code from the samples e.g.:

TextureLoader loader = new TextureLoader("bob.gif", 0, myApplet);
ImageComponent2D image = loader.getImage();
Texture2D texture = new Texture2D();
texture.setImage(0, image);

Then i get an exception on the last line when setting the image....

java.lang.IllegalArgumentException: cannot set image in default texture

If i use something like:
TextureLoader loader = new TextureLoader("bob.gif", 0, myApplet);
Texture2D texture = (Texture2D)loader.getTexture();

and then use and modify this texture e.g.

if (texture != null) {

Then it renders with the texture, but goes very, very slow.

The texture is only 32x32 pixels btw.

I'm hoping this is to do with the dodgy way I'm loading and using the texture  Wink but any idea why I can't get it to work?

Many Thanks

Offline pepe

Junior Devvie

Nothing unreal exists

« Reply #1 - Posted 2003-01-03 14:14:29 »

can you please post all the code?
Snippets won't help in this case

Home page:
GoSub: java2D gamechmark
Pages: [1]
  ignore  |  Print  

EgonOlsen (74 views)
2018-06-10 19:43:48

EgonOlsen (55 views)
2018-06-10 19:43:44

EgonOlsen (74 views)
2018-06-10 19:43:20

DesertCoockie (254 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

nelsongames (154 views)
2018-04-24 18:14:32

ivj94 (895 views)
2018-03-24 14:47:39

ivj94 (156 views)
2018-03-24 14:46:31

ivj94 (808 views)
2018-03-24 14:43:53

Solater (172 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!