Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7949505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:01:05+00:00 2026-06-04T02:01:05+00:00

If i create a list of sprites and draw them on scene – everything

  • 0

If i create a list of sprites and draw them on scene – everything is ok, but when i try to make list of spriteGroups and draw them – there is only black screen.

private Queue<SpriteGroup> linesToDraw;

...

//when user touch the screen we add sprites to our collection
if (pSceneTouchEvent.getAction() == MotionEvent.ACTION_MOVE)
{
    linesToDraw.add(DrawHelper.getBrushLine(xStart, yStart, xEnd, yEnd, 5f,mBitmapTextureAtlas, mFaceTextureRegion, getVertexBufferObjectManager()));
}

...

//here we try to draw sprites
while (linesToDraw.size() > 0)
    //this code is reachable
    linesToDraw.poll().onDraw(pGLState, mCamera);

...

public static SpriteGroup getBrushLine(float xStart, float yStart,float xEnd, float yEnd, float size,BitmapTextureAtlas atlas, ITextureRegion mFaceTextureRegion, VertexBufferObjectManager manager)
{
    SpriteGroup result = new SpriteGroup(atlas, 40, manager);
    for (int i = 0; i < count ; i++)
    {
        Sprite part =new Sprite((float)(xStart + i * sLength * cos), (float)(yStart + i * sLength * sin), mFaceTextureRegion, manager);
        result.attachChild(part);
    }
    return result;
}

...

When i use single SpriteGroup and put ArrayList into it everything is fine and i can see sprites on the scene, but List of SpriteGroup doesn’t work. Maybe smth wrong with creating the SpriteGroup with the same Texture and TextureRegion ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:01:07+00:00Added an answer on June 4, 2026 at 2:01 am

    When i use single spritegroup everything was fine, and in case of list of spriteGroups i need to make children visible by myself =)

    in getBrushLine:
    result.setChilndrenVisible(true)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you create a list of functions and then execute them sequentially, perhaps passing
To create a List, why doesn't Java allow them to be created then elements
There's a very related question: Create List<CustomObject> from List<string> however it doesn't deal with
I create something like a list of functors (functions pointers). Then I write them
I'm looking for way to create list view as like in IOS with pinned
I am using the following css to create list items with a chckerboard background
I've got an array of values that i'm using to create list items that
I have the following code. I need to create list separators before A elements,
I am new in ubuntu 12.04 LTS . I want to create list file
I want to create a list within a list item on jQuery mobile here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.